// Copyright [2020] <unknown>
#include <bits/stdc++.h>
using namespace std;
// #define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
#define dbg(x...) { cerr << "\033[32;1m" << #x << " -> "; err(x); }
void err() { cerr << "\033[39;0m" << endl; }
template<typename T, typename... A>
void err(T a, A... x) { cerr << a << ' '; err(x...); }
#else
#define dbg(...)
#endif

#define sz(x) ((int)x.size())

typedef long long LL;
int k;
const int N = 100;
int a[N][N];
int dp[N][N];
int main(int argc, char const *argv[]) {
    // code
    scanf("%d", &k);
    int nn = 1;
    while (nn <= k) nn <<= 1;
    // dbg(nn);
    int x = nn * 2 - 1;
    a[1][1] = a[2][2] = x;
    a[1][2] = nn;
    a[2][1] = k;
    a[3][2] = a[3][3] = k;
    printf("%d %d\n", 3, 3);
    for (int i=0; i<3; ++i)
        for (int j=0; j<3; ++j)
            printf("%d%c", a[i+1][j+1], j==2? '\n':' ');
    for (int i=1; i<=3; ++i)
        for (int j=1; j<=3; ++j) {
            if (i + j == 1)
                continue;
            dp[i][j] = max(dp[i-1][j] & a[i][j], dp[i][j-1] & a[i][j]);
        }
    // dbg(dp[3][3], k);
    return 0;
}
